1. Technical Field
The present invention relates to an image processing method and an image processing device for searching a region that matches a model registered in advance from an input image.
2. Related Art
In the field of FA (Factory Automation) and the like, a search process (hereinafter also referred so as “pattern matching process”) based on the pattern (hereinafter also referred to as “model”) registered in advance is used on an input image in which a measuring object (also referred to as “work”) is imaged. Defects such as scratches and dusts that appear on the work can be detected, and a region on the work similar to the model can be found through such pattern matching process.
As one method of the pattern matching process, it is known to extract a portion (hereinafter also referred to as “edge (portion)”) where the gray value (brightness) changes in the input image and to perform the pattern matching based on a value (hereinafter also referred to as “edge code” or “EC (Edge Code)”) indicating the changing direction of the edge (gradient direction of the pixel concentration). See for example, Japanese Unexamined Patent Publication No. 9-54828 (patent document 1), Japanese Unexamined Patent Publication No. 2002-230549 (patent document 2), Japanese Unexamined Patent Publication No. 2002-230562 (patent document 3), and the like.
A region that matches/is similar to the model can be accurately found even if an influence (e.g., appearing of shade and illumination unevenness) at the time of imaging of the in image exists by using the edge code.
U.S. Pat. No. 7,016,539 (patent document 4) discloses a method of searching for a plurality of patterns existing in an image using a model described by the information referred to as probes that represent the relative positional relationship of each characteristic point in the pattern.